<template>
  <div>
    <a-form-model-item label="皮肤检查" :labelCol="{ span: 3 }">
      <j-dict-select-tag
        v-model="physical.skinExam"
        dictCode="pubExam"
        style="width: 170px"
        placeholder="请选择其结果"
      />
    </a-form-model-item>

    <template v-if="physical.skinExam == 2">
      <a-form-model-item label="症状" :labelCol="{ span: 3 }">
        <j-multi-select-tag v-model="physical.skinSymptom" dictCode="pubDossierSkinSymptom" type="checkbox">
        </j-multi-select-tag>
        <template v-if="physical.skinSymptom != null && physical.skinSymptom.indexOf('5') > -1">
          <a-input placeholder="在此输入" v-model="physical.skinSymptomOther" :style="{ width: '220px' }" />
        </template>
      </a-form-model-item>
    </template>

    <a-divider />

    <a-form-model-item label="胰岛素注射部位" :labelCol="{ span: 3 }">
      <j-dict-select-tag
        v-model="physical.insulinInjection"
        dictCode="pubExam"
        style="width: 170px"
        placeholder="请选择其结果"
      />
    </a-form-model-item>

    <template v-if="physical.insulinInjection == 2">
      <a-form-model-item label="症状" :labelCol="{ span: 3 }">
        <j-multi-select-tag
          v-model="physical.insulinInjectionSymptom"
          dictCode="pubDossierInsulinSymptom"
          type="checkbox"
        >
        </j-multi-select-tag>
        <template v-if="physical.insulinInjectionSymptom != null && physical.insulinInjectionSymptom.indexOf('4') > -1">
          <a-input placeholder="在此输入" v-model="physical.insulinInjectionSymptomOther" :style="{ width: '220px' }" />
        </template>
      </a-form-model-item>
    </template>

    <!-- <a-divider orientation="left" :style="{ marginTop: '40px' }">上传体格检查报告单</a-divider>
    <a-form-model-item label="报告名称">
      <a-input v-model="physical.skinReportName" :max-length="20" :style="{ width: '300px' }" />
    </a-form-model-item>

    <a-form-model-item label="报告结论">
      <a-textarea
        :maxLength="500"
        v-model="physical.skinReportContent"
        placeholder=""
        :auto-size="{ minRows: 7, maxRows: 10 }"
        :style="{ width: '300px' }"
      />
      <div
        v-if="physical.skinReportContent != null && physical.skinReportContent.length > 0"
        :style="{ display: 'inline-block', marginLeft: '1rem' }"
      >
        {{ physical.skinReportContent.length }}/500
      </div>
    </a-form-model-item>

    <a-form-model-item v-bind="tailFormItemLayout">
      <j-image-upload
        text="上传"
        v-model="physical.skinReportPhoto"
        :is-multiple="true"
        :style="{ marginTop: '1.5rem' }"
        :preview="true"
        :img-arr="
          Array.isArray(physical.skinReportPhoto)
            ? physical.skinReportPhoto
            : physical.skinReportPhoto
            ? physical.skinReportPhoto.split(',')
            : []
        "
      ></j-image-upload>
    </a-form-model-item> -->
  </div>
</template>

<script>
export default {
  name: 'FundusChecking',
  props: ['physical'],
  data() {
    return {
      skinExamOptions: ['0'],
      tailFormItemLayout: {
        wrapperCol: {
          xs: {
            span: 24,
            offset: 0
          },
          sm: {
            span: 12,
            offset: 2
          }
        }
      }
    }
  },
  methods: {}
}
</script>

<style lang="less" scoped>
.ant-form-item {
  margin: 0;
}
</style>

